/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.biblioteca.service;

import com.biblioteca.beans.Prestamo;
import com.biblioteca.dao.PrestamoDAO;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 *
 * @author Jesus
 */
@Service
public class PrestamoService {
    
    @Autowired
    private PrestamoDAO iPrestamo;
    
    public int Insert(Prestamo prestamo) throws Exception{
        return iPrestamo.Insert(prestamo);
    }
    
    public List<Prestamo> getAll()throws Exception{
        return iPrestamo.getAll();
    }
    
    public int actualizar(Prestamo prestamo)throws Exception{
        return iPrestamo.actualizar(prestamo);
    }
    
    public int eliminar(int id)throws Exception{
        return iPrestamo.eliminar(id);
    }
    
    public Prestamo getid(int id)throws Exception{
        return iPrestamo.getid(id);
    }
    
}
